//
//  SecondViewController.swift
//  TabbarController
//
//  Created by zhangjianyun on 17/6/29.
//  Copyright © 2017年 com.taihejiacheng. All rights reserved.
//

import UIKit

class SecondViewController: UIViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        let textField1 = UITextField.init(frame: CGRect.init(x: 20, y: 100, width: 100, height: 30));
        textField1.text = "14"
        let textField2 = UITextField.init(frame: CGRect.init(x: 150, y: 100, width: 100, height: 30));
        textField2.text = "8"
        
        let value = Int(textField1.text!)! + Int(textField2.text!)!
        
        print(value)
        self.view.addSubview(textField1)
        self.view.addSubview(textField2)
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
